package com.example.kaoshi;

import java.util.Scanner;

/**
 * Created by Quincy on 2018/9/26.
 */
public class Migong {
    static int[][] rect = null;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        rect =new int[n][m];
        if (rect.length > 1000 || rect.length <= 1)
            return;
        for (int i = 0; i < n ; i++){
            for (int j = 0; j < m; j++)
                rect[i][j] = in.nextInt();
        }
        getStep(rect);
    }

    private static void getStep(int[][] rect) {
        if (rect[0][0] != 0) return;

    }
}
